import request from '@/utils/request'

// 查询产品客户端发布列表
export function listProductClientRelease(query) {
  return request({
    url: '/produce/product-client-release/list',
    method: 'get',
    params: query
  })
}

// 查询产品客户端发布详细
export function getProductClientRelease(id) {
  return request({
    url: '/produce/product-client-release/' + id,
    method: 'get'
  })
}

// 新增产品客户端发布
export function addProductClientRelease(data) {
  return request({
    url: '/produce/product-client-release',
    method: 'post',
    data: data
  })
}

// 修改产品客户端发布
export function updateProductClientRelease(data) {
  return request({
    url: '/produce/product-client-release',
    method: 'put',
    data: data
  })
}

// 删除产品客户端发布
export function delProductClientRelease(id) {
  return request({
    url: '/produce/product-client-release/' + id,
    method: 'delete'
  })
}

// 逻辑删除产品客户端发布
export function removedProductClientRelease(id) {
  return request({
    url: '/produce/product-client-release/' + id,
    method: 'delete'
  })
}


// 任务状态修改
export function changeStatus(id, status) {
    return request({
      url: '/produce/product-client-release/change-status',
      method: 'put',
      params:{
        id,status
      },
    })
}

// 修改产品软件包发布状态
export function pub(id,releaseStatus) {
    return request({
      url: '/produce/product-client-release/change-release-status',
      method: 'put',
      params:{
        id,releaseStatus
      }
    })
  }